package com.huizhan.web.model;

import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import io.swagger.annotations.*;

/**
 * api结果
 */
@JsonIgnoreProperties({ "handler","hibernateLazyInitializer" })
@ApiModel(value =  "api返回结果")
public class ApiResult<T> implements Serializable{
	private static final long serialVersionUID =  2478339379605327563L;

    /**
     * 是否错误
     */
	@ApiModelProperty(value = "是否错误")
    private boolean hasError;

	/**
	 * 消息
	 */
	@ApiModelProperty(value = "消息")
	private String message;

    /**
     * 数据
     */
	@ApiModelProperty(value = "返回数据")
    private T data;

    /**
     * 总数
     */
	@ApiModelProperty(value = "总数")
    private Long total;

    public Boolean getHasError() {
        return this.hasError;
    }

    public void setHasError(Boolean hasError) {
        this.hasError = hasError;
    }

	public String getMessage() {
		return this.message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public T getData() {
		return this.data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public Long getTotal() {
		return this.total;
	}

	public void setTotal(Long total) {
		this.total = total;
	}
}